home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 001a / combi11c.zip / README < prev    next >
Text File  |  1992-12-01  |  23KB  |  567 lines

  1.                         COMBI-Disk -
  2.                    RAM disk & disk cache
  3.  
  4.  
  5. Preface.
  6. --------
  7.  
  8.         - Why don't You use disk cache?
  9.         - I'd like, but memory constrains prevent me from using it:
  10.           I need more memory for  RAM disk.
  11. -----
  12.         - Why don't You use RAM disk?
  13.         - I'd like, but memory constrains prevent me from using it:
  14.           I need more memory for disk cache.
  15. -----
  16.         - Why don't You use RAM disk or disk cache?
  17.         - I'd like, but some of my applications require free extended
  18.           memory.
  19.  
  20. If one of these answers is Yours then COMBI-Disk is for You!
  21. You may hit THREE targets with a single shot - installing COMBI-Disk
  22. You get a RAM disk and a Disk-Cache and free XMS memory at the same
  23. time in the SAME area of extended memory!
  24.  
  25. When You install COMBI-Disk You specify amount of extended memory for
  26. it and You get a RAM disk of the specified size and a Disk-Cache of the
  27. same size. You may also specify amount of memory which should be
  28. released if some program requires it. Then when You work with Your PC,
  29. You enjoy COMBI's disk cache which is not worse than others (I hope it
  30. is better).  Suppose now that You start a program which needs a disk
  31. buffer for temporary storage and tell it to use RAM disk.  Then the
  32. program may use the whole amount of the RAM disk's space (though
  33. contracting the size of cache).  When it terminates and deletes
  34. temporary files You get back your cache buffer!  If a program requests
  35. XMS memory COMBI-disk may loan some of its memory to the program (if it
  36. has the requested amount free of RAM disk data). When the program
  37. releases the memory COMBI-disk reallocates it back.
  38.  
  39.  
  40. Applications.
  41. ------------
  42.  
  43. Some programs (e.g. compilers, word-processors etc.) need a buffer for
  44. temporary storage, and if the storage is RAM disk then their performance
  45. may be increased few times compared with the case of usage of hard disk
  46. instead. That's why You may sometimes need a RAM disk. But if You use
  47. standard RAM disk (Microsoft (C) RAMDRIVE.SYS or IBM (C) VDISK.SYS or any
  48. other) it often comes out that it stays empty most of the time though
  49. consuming Your extended (expanded) memory. That's why You may wish to
  50. give up using RAM disk or make it less in order to have more memory
  51. for disk cache which is always useful.
  52.  
  53. Moreover, some of programs can take advantage of XMS memory if it is
  54. available. That's why You may wish to give up using disk cache (though
  55. some of caches support memory reallocation without reinstallation).
  56.  
  57.                 Don't get disappointed!
  58.      COMBI-Disk
  59. is a nice solution of this problem! It uses a little more memory for
  60. RAM disk than is needed to keep all files written into it while all the
  61. remaining memory is used for cache.  You need not bother to make this
  62. memory larger - just WRITE Your file(s) into RAM disk, all the rest it
  63. does itself! You need not bother as well to contract RAM disk's size
  64. and increase cache size - just DELETE files from RAM disk and all the
  65. released memory will be used for cache!  You need not bother to
  66. reconfigure Your system when You need some free XMS memory - COMBI-disk
  67. takes care of that itself (however, if You forgot to specify amount of
  68. memory COMBI-disk would release, You have to run COMBI control program
  69. to tell COMBI-disk that You need certain amount of free XMS memory).
  70.  
  71.  
  72. System requirements.
  73. -------------------
  74.  
  75.         1. 80x86 based machine with extended memory.
  76.         2. DOS 3.30+.
  77.         3. Extended memory manager which supports XMS 2.0 specifications
  78.        which supports "reallocate XMS" function (Microsoft (C) HIMEM.SYS
  79.            ver 2.77+ or Quarterdeck (C) QEMM.SYS will do, as well as most
  80.            others).
  81.  
  82.  
  83. General features.
  84. ----------------
  85.  
  86.         - COMBI-disk may use up to 16 Mbytes of extended (XMS) memory.
  87.         - Up to 8 physical hard disks are supported.
  88.         - Starting from version 1.00 background write caching is
  89.           supported.
  90.         - Automatic reallocation of XMS memory.
  91.         - Variable size of cache block (memory allocation unit) -
  92.           from 1 to 8 disk sectors (512 bytes each).
  93.         - IOCtl interface to control program.
  94.         - HMA may be used for COMBI-disk data tables (even when MS-DOS
  95.           5.0 is loaded into HMA and under DR-DOS 6.0 as well).
  96.  
  97.  
  98. Installation.
  99. ------------
  100.  
  101. Warning! It is recommended to make backup of hard disk before
  102. installation of COMBI-disk (as well as any other disk cache program).
  103.  
  104. COMBI-Disk installation process is quite straightforward, although it
  105. requires some tweaking with the contents of your CONFIG.SYS file. Copy
  106. COMBI.SYS into Your hard-disk and insert the following line into Your
  107. CONFIG.SYS file
  108.  
  109.         DEVICE=[drive:][path]COMBI.SYS [<parameters>]
  110.  
  111. The proper place in CONFIG.SYS would be after all memory managers,
  112. after disk managers and if possible before disk write-protection
  113. programs (otherwise You should not turn on write caching).
  114.  
  115. The <parameters> are all optional and include:
  116.  
  117. [<buff_size> [<rls_size>]] [/V [<RAMd_parms>]] [/C [<cache_parms]] [/H] [/Q]
  118.  
  119.  
  120.  
  121. <buff_size> -  the amount of XMS memory (Kbytes) You want to use for
  122.                COMBI-Disk. Minimum  is 128K, maximum is about 14000K.
  123.                If it is omitted then all available memory is default.
  124.                There is no harm if You specify more memory than really is
  125.                available - then COMBI-disk uses all available memory.
  126.  
  127. <rls_size>  -  maximum number of XMS memory (Kbytes) COMBI-disk should
  128.                release when it is requested. Default is 0. Note, if You
  129.                want to specify this number You should also specify
  130.                <buff_size>.
  131.  
  132. /V          -  means that RAM disk parameters follow.
  133.  
  134. <RAMd_parms> - RAM disk parameters may be the following:
  135.  
  136. F:<disk_size>- specifies formatted size of RAM disk. By default COMBI
  137.                creates RAM disk of the size (<buff_size> - <rls_size> -
  138.                - <min_cache>) Kbytes, so that there would never arise
  139.                problem that there is not enough free XMS memory to
  140.                allocate for RAM disk. But You may (and I recommend You)
  141.                specify larger size: up to (<buff_size> - <min_cache>) -
  142.            that gives You maximum flexibility though sometimes may
  143.            cause errors if the same program that borrowed XMS from
  144.            COMBI tries to write a lot to RAM disk.
  145.  
  146. R:<root_num> - number of entries in root directory of RAM disk. Default
  147.                is 64. If You encounter DOS error "can't create file..."
  148.                when number of file in root directory is 63 (plus one
  149.                for volume label) then try specifying, say, R:128.
  150.  
  151. S:<sect_size>- sector size for RAM disk - 256 or 512 bytes, default is
  152.                512 bytes. Using 256 bytes sectors may sometimes save
  153.                some space on RAM disk but this is effective only if
  154.                RAM disk size is less than 1 Mbyte.
  155.  
  156. N           -  tells RAM disk not to return 'sector not found' error
  157.                (see also below). This setting may be always changed by
  158.                control program.
  159.  
  160. /C          -  means that cache parameters follow.
  161.  
  162. <cache_parms>- cache parameters may be the following:
  163.  
  164. M:<min_cache>- specifies minimum cache size (Kbytes). This reduces size
  165.                of RAM disk but guarantees that specified amount of
  166.                memory will be always allocated to cache. Default is 0.
  167.  
  168. U:<block_sec>- number of sectors per cache block (from 1 to 8). Using
  169.                smaller blocks may result in more effective usage of
  170.                memory (if You have not much of it) but leads to slower
  171.                operation for large read/write transfers. Default is 8.
  172.  
  173. O           -  tells COMBI-disk to turn OFF disk cache after
  174.                installation. Cache may be turned ON at any time by
  175.                control program. This may be useful for testing period
  176.            if You have some problems.
  177.  
  178. B           -  enable background disk writes. By default background
  179.                writes are set off on installation. May be changed at
  180.                any time by control program.
  181.  
  182. I           -  forces COMBI's disk cache to start background writing
  183.                immediately. By default background writing starts within
  184.                18 timer ticks (approx. 1 sec.) after last access to hard
  185.                disk. This is in effect only when background writing is
  186.                enabled. I admit that sometimes it may be more safe to
  187.            start writing immediately rather than wait a second, but
  188.            as a rule that slows down cache performance, especially
  189.            for large transfers.
  190.  
  191. /H          -  tells COMBI-disk to use HMA for data tables.
  192.  
  193. /Q          -  tells COMBI-disk not to display installation parameters.
  194.  
  195. In short, recommended installation parameters for best performance are:
  196.  
  197. DEVICE=<drive>:<path>COMBI.SYS 16000 16000 /V F:16000 /C B /H
  198.  
  199. In this case COMBI allocates all available XMS memory but will release
  200. almost all when it is requested, RAM disk is created of maximum size
  201. and write caching is enabled. (You may use other numbers instead of 16000
  202. if You have less than 16 Mbytes of XMS or don't want to spend all XMS
  203. for COMBI.)
  204.  
  205. Note:   Minus ('-') may be used everywhere in command line instead of
  206.         slash ('/'), and equal sign ('=') instead of colon (':'). Case
  207.         of the letters is insignificant. Spaces are required only after
  208.         COMBI.SYS name and between two adjacent numbers.
  209.  
  210.  
  211. Installation messages.
  212. ---------------------
  213.  
  214.                 COMBI-Disk: RAM disk & disk cache
  215.         Copyright (C) 1991, 1992 by Vadim V. Vlasov, Moscow, Russia,
  216.                         Version 1.10
  217.  
  218.              - This banner always appears and tells You that
  219.                COMBI-disk is being installed.
  220.  
  221.  
  222. ERROR: Incorrect DOS version!
  223.  
  224.              - DOS version must be above or equal to 3.30 and below 6.00.
  225.  
  226. ERROR: Invalid parameter!
  227.  
  228.              -  An invalid parameter appears in command line or some
  229.                 parameter is specified in improper place.
  230.  
  231. ERROR: Extended Memory Manager not present!
  232.  
  233.              -  COMBI-Disk needs XMM driver. Check that Your XMM driver
  234.                 is installed before COMBI-Disk.
  235.  
  236. ERROR: No extended memory available!
  237.  
  238.              -  All Your extended memory is used by some other programs
  239.                 or less than 128K is available.
  240.  
  241. ERROR: Can't allocate extended memory!
  242.  
  243.              -  An error encountered when COMBI-Disk tried to allocate
  244.                 extended memory.
  245.  
  246. ERROR: Not enough memory!
  247.  
  248.              -  Not enough memory for COMBI-disk's code and data. This
  249.                 is almost impossible.
  250.  
  251. ERROR: No hard drives on system(?!)
  252.  
  253.              -  COMBI-disk can't determine presence of hard disk(s) and
  254.                 its (their) parameter(s).
  255.  
  256. WARNING: Inconsistent parameters.
  257.  
  258.              -  Some of numeric parameters conflict with each other. As
  259.                 a rule this is not fatal - some of the numbers will be
  260.                 adjusted.
  261.  
  262. WARNING: Can't hook XMS driver entry chain.
  263.  
  264.              -  COMBI-disk won't intercept XMS (re)allocation calls and
  265.                 hence automatic reallocation of COMBI's memory is
  266.                 disabled. However, You may change amount of used XMS
  267.                 memory by control program.
  268.  
  269. WARNING: Not enough HMA for data tables or HMA not available.
  270.  
  271.              -  COMBI-disk will use more low memory for its data tables.
  272.                 (For 3 Mbytes buffer it is about 10K)
  273.  
  274. If "ERROR:..." message is displayed COMBI-disk aborts installation.
  275.  
  276. If the installation is successful a table appears (if it is not
  277. disabled by /Q switch) which summarizes installation options and
  278. announces how much memory is used by COMBI-disk.
  279.  
  280. Note. Some of numeric parameters specified in command line may be
  281. adjusted by COMBI-disk.
  282.  
  283.  
  284. Testing.
  285. -------
  286.  
  287. A simple test program CMBTEST.COM is supplied with the package. It
  288. writes randomly to few files, deletes some of them etc. Its objective
  289. is to convince You that memory allocation strategy used by COMBI-disk
  290. is reliable. It may also be used to test write caching reliability.
  291.  
  292. Usage:
  293.         CMBTEST <dirname> [<options>]
  294. where <dirname> is name of directory (or drive) where CMBTEST  will
  295. write the files - it may be a directory on a hard drive or COMBI's RAM
  296. disk. <options> may be used if You want to run multiple test series.
  297. (For more details see the source code CMBTEST.C) I suggest You to
  298. run
  299.         CMBTEST <COMBI's_RAM_drive_letter>:
  300. and then
  301.         CMBTEST <some_temporary_directory_on_hard_disk>
  302. and compare the resulted files:
  303.         COMP <path1>*.* <path2>
  304. (<path1(2)> - pathnames of target directories). If all the "files
  305. compare O'K" then there is no error and You may delete the files or
  306. repeat the test with other options. Note: options must be the same for
  307. both runs otherwise the files will be different.
  308.  
  309. You may also change the program if You have any new ideas how to
  310. improve the test.
  311.  
  312.  
  313. Control of operation.
  314. --------------------
  315.  
  316. A control program COMBI.COM is supplied with the package. It allows
  317. You to change cache or RAM disk options or change memory setting
  318. without reconfiguring and rebooting. It also displays some statistic
  319. information which may be helpful: current options, number of read/write
  320. accesses to hard/RAM disk etc.
  321.  
  322. Usage:
  323.         COMBI [+/-<mem_change] [<options>...]
  324. where
  325.  
  326. <mem_change> -  amount of memory (Kbytes) to add to or release from
  327.                 COMBI-disk. If memory can't be reallocated by specified
  328.                 amount COMBI will report that.
  329.  
  330. <options>    -  a sequence of any of letters 'i', 'o', 'b', 'z', 'f',
  331.                 'r', 'n' which may be separated by spaces and/or
  332.                 followed by '-' which reverses the meaning of the
  333.                 option. Case of the letters is insignificant.
  334.  
  335. i            -  turn off delayed writing (write immediately) ('i-'
  336.                 turns delayed writing on),
  337.  
  338. o            -  turn cache on ('o-' - turn off),
  339.  
  340. b            -  enable background writing ('b-' - disable),
  341.  
  342. z            -  'freeze' cache - after freezing the sectors which are
  343.                 already in cache remain there (are not purged) while
  344.                 no new sectors are copied to cache. This may be useful
  345.                 e.g. if You have small cache and want to keep there
  346.                 only FAT and directories, then You might run "CHKDSK"
  347.                 (which reads the whole FAT and all the directories)
  348.                 and then "COMBI z". 'z-' returns cache to normal
  349.                 operation.
  350.  
  351. f            -  fix memory settings - this disables automatic
  352.                 reallocation of XMS memory to other programs.
  353.  
  354. n            -  tells RAM disk not to return 'sector not found' error.
  355.  
  356. r            -  resets all statistic counters (there is no 'r-'
  357.                 option).
  358.  
  359. "COMBI ?" displays quick help on parameters usage.
  360.  
  361. Source code COMBI.C and header file IOCTL.H are provided if You wish
  362. to implement some control over COMBI-disk into Your applications
  363.  
  364.  
  365. Compatibility.
  366. -------------
  367.  
  368. COMBI-disk is compatible with:
  369.  
  370.   - MS-DOS versions 3.30 - 5.00 (if it were not it would be useless);
  371.  
  372.   - DR-DOS version 6.00 (version 5.00 was not tested);
  373.  
  374.   - Borland's Turbo-debugger TD386 (TD386 uses XMS memory released by
  375.     COMBI-disk);
  376.  
  377.   - MS-WINDOWS;
  378.  
  379.   - DJGPP (GNU C++ compiler for DOS and GO32 DOS extender by
  380.     DJDelorie), however LD (DJGPP linker) often runs into "Sector not
  381.     found" error if some of object files are on RAM disk, usage of "N"
  382.     installation option or "COMBI n" solves the problem;
  383.  
  384.   - many other programs.
  385.  
  386. COMBI-disk is incompatible with:
  387.  
  388.   - Maybe some multitasking programs (please report me about any
  389.     incompatibilities).
  390.  
  391.  
  392. Possible errors.
  393. ---------------
  394.  
  395. Sector not found - You tried to read a sector which does not contain
  396.         any valid data (You haven't written into it yet or have  already
  397.         deleted the file that occupied this sector). This never happens
  398.         with the majority of programs. However, for some programs this
  399.         occurs regularly. It is recommended to reply 'Ignore' to the
  400.         'Retry, Ignore, Fail?' DOS prompt. If You are sure that this
  401.         causes no errors You may specify option 'N' as one of
  402.         installation parameters (or run "COMBI n"). In this case the
  403.         'not found' sectors are also not read, but error status is not
  404.         returned by COMBI-disk.
  405.  
  406. Warning! Once a file is deleted from RAM disk, it might not be correctly
  407. unerased by any means. It's data is lost immediately.
  408.  
  409. Data error writing drive <RAM_disk> - this may happen when some XMS
  410.         memory has been loaned to a program and that program also tries
  411.         to write some files to RAM disk which has not enough memory for
  412.         that. Suggested action - specify less amount of memory which
  413.         COMBI-disk should release for other programs or configure the
  414.         program to use other drive for temporary files.
  415.  
  416.         The same problem may arise if a program which used XMS memory
  417.         terminated (or has been aborted) but not released memory. In
  418.         this case COMBI-disk can't reallocate XMS memory back to the
  419.         full size. It continues working but won't use the full buffer
  420.         size for cache or RAM disk data.
  421.  
  422.         Other errors indicate that either COMBI-Disk internal data tables
  423. are corrupt (e.g. overwritten by other program) or error in XMM driver
  424. encountered.
  425.  
  426.  
  427. Some hints.
  428. ----------
  429.  
  430. "TEMP" environment variable is used by MS-DOS as a directory for
  431. temporary files, in particular when COMMAND.COM creates pipes
  432. (e.g. "dir | sort | more" etc.).
  433.  
  434. "TMP" environment variable is used by many programs (e.g. Microsoft
  435. compilers) as a directory for temporary files. So, setting TEMP and TMP
  436. in AUTOEXEC.BAT to point to Your RAM disk may improve Your system
  437. performance.
  438.  
  439. Many other programs also can take advantage of RAM disk - see their
  440. manuals and configure them.
  441.  
  442. Using write caching is not very dangerous as it might seem. In fact,
  443. when COMBI-disk is configured for background writing it often takes
  444. less time to finish writing to hard disk than without write caching.
  445. Moreover, while data is being written to disk You program continues
  446. working and that saves You a lot of processor time. Enabling delayed
  447. writing as a rule decreases number of hard disk accesses and hard disk
  448. head motions. However, if You start a program that hooks INT 08 (timer)
  449. and does not pass control to former INT 08 handlers (some games often
  450. do so) it would be better if You disable delayed writes ("COMBI i")
  451. before starting such a program and enable it later ("COMBI i-").
  452.  
  453. Freezing cache ("COMBI z") when it contains certain data may be useful
  454. if COMBI-disk's buffer size is relatively small. E.g. Freezing cache
  455. after "CHKDSK" results in faster search for a file or directory change,
  456. freezing cache after run of some program (whose size is less than cache
  457. size) results in faster loading of that program on future runs (while
  458. other programs operate as without cache).
  459.  
  460.  
  461. The name of the game.
  462. --------------------
  463.  
  464. The name "COMBI" originates from "COMBInation" of such incompatible
  465. (maybe even contradicting) at the first sight programs: RAM disk and
  466. disk cache.
  467.  
  468.  
  469. History information.
  470. -------------------
  471.  
  472. Version 1.10 (01 Dec 1992):
  473.  
  474. Few bugs of version 1.00 were fixed. These include:
  475.   - "Not enough memory" error under DOS other than MS v.5.00;
  476.   - Very poor performance (worse than without cache) if VERIFY is set ON.
  477.  
  478. Now COMBI may use HMA under DR-DOS as well.
  479. Performance of cache improved.
  480. Write delay time increased from 5 to 18 clock ticks (1 sec).
  481. Added Ctrl-Alt-Del handling to flush cache before reboot.
  482. COMBI control program renamed from "CMBCTL" (which was hardly typeable
  483. and hardly rememberable) to "COMBI", ANSI sequences are used to provide
  484. color output.
  485.  
  486. Version 1.00 (08 Aug 1992):
  487.  
  488. A lot of new features added compared to previous versions: write
  489. caching, reallocation of XMS memory, IOCtl interface to control
  490. operation of COMBI-disk etc. Most of the code has been completely
  491. rewritten. However, the main idea of dynamical memory reallocation
  492. between RAM disk and disk cache remained the same.
  493.  
  494. Version 0.31 (15 Feb 1992):
  495.  
  496. Few minor bugs of version 0.30 fixed.
  497. No other serious changes.
  498.  
  499. Version 0.30 (08 Nov 1991):
  500.  
  501. Performance of delete from RAM disk operations increased compared to
  502. previous versions.
  503.  
  504. For certain configuration parameters (e.g. 320 /v 128 256) COMBI-Disk
  505. created FAT larger than really needed. However, it was O'K for DOS 5.0
  506. but led to errors with DOS 3.30.
  507.       - Now it is fixed.
  508.  
  509. Version 0.20 (28 Oct 1991):
  510.  
  511. A bug has been discovered in version 0.10: RAM disk failed after an
  512. attempt to write into boot sector and one or more sectors of FAT.
  513.       - Now it is fixed.
  514.  
  515. DOS 4.0+ CHKDSK did not work with version 0.10 due to simplified
  516. format of boot sector of RAM disk.
  517.       - This is now corrected for MS-DOS 5.0 but some DOS versions need
  518.         a certain text be written into boot sector (e.g. for IBM-DOS 4.0
  519.     it is "RDV 1.20" at offset 3 of boot sector). If You are aware
  520.         what You are doing, You may correct this problem for Your DOS.
  521.  
  522. Version 0.10 (13 Aug 1991):
  523.  
  524. The very first beta version of COMBI-Disk was version 0.01 (24 Jun 1991).
  525. In this version (0.10) two minor bugs have been fixed:
  526.         A. COMBI-Disk v.0.01 refused to work under DOS 3.30 - not
  527.            just it couldn't but only refused.
  528.         B. Device return codes were corrected.
  529. No any serious bugs were discovered yet.
  530.  
  531.  
  532. Future.
  533. ------
  534.  
  535. Here are some of my ideas about future developement of COMBI:
  536.  
  537.   - Caching of floppy disks;
  538.  
  539.   - Special version for 80386 processor (probably, usage of 80386
  540.     instructions may increase performance);
  541.  
  542.   - Reallocation of XMS memory allocated to other programs is not
  543.     currently supported (some of programs allocate XMS and then reallocate
  544.     it to larger size) - that will be certanly done;
  545.  
  546.   - As regards usage of EMS instead of XMS, I'm not sure that it would be
  547.     an advantage. However, if there is enough interest in that I'll implement
  548.     EMS support;
  549.  
  550.   - Further improvement of performance.
  551.  
  552.  
  553. ----------------
  554. If You have any questions, comments or find out any problems with
  555. COMBI-disk usage please contact:
  556.  
  557.         Vadim V. Vlasov,
  558.         Inst. for Nuclear Research of Russian Acad. Sci.,
  559.         60th October Anniversary prospect, 7a,
  560.         117312, Moscow, Russia.
  561.  
  562.         phone:    7-095-133-6533
  563.  
  564.         Internet: vvlasov@inucres.msk.su
  565.  
  566.  
  567.